using System;
using System.Collections.Generic;
using Nop.Core.Domain.Discounts;
using Nop.Core.Domain.Localization;
using Nop.Core.Domain.Security;
using Nop.Core.Domain.Seo;

namespace Nop.Core.ApiDataModel
{
    /// <summary>
    /// Represents a Picture MVC API Picture.
    /// </summary>
    public partial class Picture
    {
        /// <summary>
        /// Gets or sets the picture ID
        /// </summary>
        public int PictureId { get; set; }  // TBD, should we use guid/ULONG etc for ID?

        /// <summary>
        /// Gets or sets the picture binary
        /// </summary>
        public byte[] PictureBinary { get; set; }

        /// <summary>
        /// Gets or sets the SEO friednly filename of the picture
        /// </summary>
        public string Filename { get; set; }

        public Picture(Nop.Core.Domain.Media.Picture pic)
        {
            this.PictureId = pic.Id;
            this.PictureBinary = pic.PictureBinary;
            this.Filename = pic.SeoFilename;
        }

        public Picture(Nop.Core.Domain.Catalog.ProductPicture prodPicture)
        {
            this.PictureId = prodPicture.Picture.Id;
            this.PictureBinary = prodPicture.Picture.PictureBinary;
            this.Filename = prodPicture.Picture.SeoFilename;
        }
    }
}
